package com.data.security;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class CarpetasActivity extends Activity {

	private ListView lista;
	

	@Override
	public void onCreate(Bundle s) {
		super.onCreate(s);
	
		setContentView(R.layout.activity_carpetas);

		lista = (ListView) findViewById(R.id.listaCarpetas);
		String data[] = {getString(R.string.encriptados), getString(R.string.desencriptados)};
		ArrayAdapter<String> adaptador = new ArrayAdapter<String>(this,
				
				
				android.R.layout.simple_list_item_1, data);
		lista.setAdapter(adaptador);
		lista.setOnItemClickListener(listener);
	}

	private OnItemClickListener listener = new OnItemClickListener() {

		@Override
		public void onItemClick(AdapterView<?> parent, View view, int position,
				long id) {
			Intent intencion=new Intent(getApplicationContext(),ArchivosNubeActivity.class);
			Log.d("Raiz a pasar", position+"");
			intencion.putExtra("raiz", position);
			startActivity(intencion);
		}
	};
	
	
	
	@Override
	public void onPause(){
		super.onPause();
		this.finish();
	}
}
